home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / ControlPanelDev / EnToutesLettres / ETL.DevDoc / En Toutes Lettres.Info next >
Encoding:
Text File  |  1992-03-10  |  1.8 KB  |  53 lines  |  [TEXT/KAHL]

  1. Note for developpers:
  2. En Toutes Lettres™ use translators that are LGDF resources containing a single
  3. procedure : pascal void main(char *text,char *result);
  4. text is the original numeric string (C string) and result is a pointer on a chat buffer
  5. to be filled by the translator (C string).
  6. By convention, the ID of the LGDF resource "must" be the corresponding ID defined in the
  7. Inside Mac for the target language (US english = 0, French = , â€¦)
  8.  
  9. If the corresponding check box is active in the Control Panel Device the ETLE gestalt
  10. selector is intalled. When Gestalt is called with ETLE as the selector, result is set to
  11. a pointer on the GestaltInfo structure used by En Toutes Lettres. 
  12. The fields must be considered READ ONLY. Modification of the fields directly by an application
  13. will NOT be reflected in the menu.
  14. This makes possible for any application to call the En Toutes Lettres translators.
  15. The GestaltInfo structure ends with a variable length array containing the information
  16. for each of the available translators.
  17.  
  18. typedef    pascal void    (*LgdfProcPtr)(char *text,char *result)    ;
  19.  
  20. typedef struct TransInfo
  21. {
  22.     short        fIntlID        ;    /*    ID of the translator    */
  23.     Str32        fName        ;    /*    name of the translator == resource name    */
  24.     LgdfProcPtr    fProc        ;    /*    proc ptr on the code resource    */
  25. }
  26.     TransInfo    ;
  27.  
  28. /*    fCurFormat values:    */    
  29. #define    kCapitalize        4
  30. #define    kUppercase        5
  31. #define    kLowercase        6
  32.  
  33. /*    fCurEnding values:    */
  34. #define    kSpace            8
  35. #define    kTabulation        9
  36. #define    kCR                10
  37.  
  38. typedef struct GestaltInfo
  39. {
  40.     short        fVersion        ;    /*    currently 0x0100    */
  41.     short        fNTranslators    ;    /* the number of translators available    */
  42.     short        fCurFormat        ;
  43.     short        fCurEnding        ;
  44.     Boolean        fDoFinancial    ;
  45.     Boolean        fDoAutoReplace    ;
  46.     Boolean        fEnable            ;    /*    if the patches are enabled    */
  47.     TransInfo    fTranslators[1]    ;
  48. }
  49.     GestaltInfo;
  50.  
  51. typedef    GestaltInfo    *GestaltInfoPtr    ;
  52.  
  53.